home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / online / fidonetts / pkt3str.pas < prev    next >
Pascal/Delphi Source File  |  1995-03-01  |  6KB  |  167 lines

  1. (* Structures for TYPE-3 in Pascal *)
  2.  
  3. /* You may have to change the order of the components in the sets */
  4. /* You probably have to if using a Motorola CPU, this is for Intel */
  5.  
  6. TYPE
  7.     Longword = Longint; (* Please note that Longint in Pascal is signed, *)
  8.                         (* it should be unsigned. *)
  9.  
  10.     TAddress = RECORD
  11.         Zone: Word; (* Zone address *)
  12.         Net: Word; (* Net address *)
  13.         Node: Word; (* Node address *)
  14.         Point: Word; (* Point address or zero if boss *)
  15.     END;
  16.  
  17.     CWtype =
  18.     (Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9,
  19.      Type10, Type11, Type12, Type13, Type14, Type15, Type16, RFC822);
  20.  
  21.     CapabilityWord = SET OF CWtype;
  22.  
  23.     TTimeStamp = Longword;
  24.  
  25.     FlagType =
  26.         (Pvt (* Private message *),
  27.          FileAttach (* File attach message *),
  28.          FileReq (* File request message *),
  29.          UpdReq (* File update request message *),
  30.          Direct (* Do not route this message *),
  31.          Crash  (* High-priority mail *),
  32.          Hold (* Hold for pickup *),
  33.          IMM (* Immediate mail *),
  34.          RRQ (* Return receipt request *),
  35.          CRQ (* Confirm receipt request *),
  36.          IRR (* Is return receipt *),
  37.          Machine (* Message to a program *),
  38.          NoForCC (* CC in NetMail, NoForward in EchoMail *),
  39.          Permanent (* Message should not be pruged by age *),
  40.          Foreign (* Message is from another organization *),
  41.          reserved15 (* Reserved for future extension *));
  42.  
  43.     TMsgFlags = SET OF FlagType;
  44.  
  45.     LocalFlagType =
  46.         (Local (* Message is created localy *),
  47.          InTransit (* Message is not destinated for this system *),
  48.          Orphan (* Unknown destination *),
  49.          KillSent (* Remove message after it has been sent *),
  50.          DelSent (* Delete attached file(s) after they have been sent *),
  51.          TruncSent (* Truncate attached file(s) after they have been sent *),
  52.          Sent (* Message has been sent *),
  53.          IsRead (* Message has been read by the SysOp *),
  54.          Rcvd (* Message has been read by its addressee *),
  55.          LockMsg (* Lock the message for further access *),
  56.          DontSend (* Do not send the actual message *),
  57.          unused11 (* Reserved for future extension *),
  58.          unused12 (* Reserved for future extension *),
  59.          unused13 (* Reserved for future extension *),
  60.          unused14 (* Reserved for future extension *),
  61.          unused15 (* Reserved for future extension *));
  62.  
  63.     TLocalFlags = SET OF LocalFlagType;
  64.  
  65.     TPKTheader = RECORD
  66.         PktOrig: TAddress; (* The node who created this packet *)
  67.         PktDest: TAddress; (* The node who should receive this packet *)
  68.         SubType: Word; (* Packet contents *)
  69.         PktType: Word; (* Always 3 *)
  70.         PktDate: TTimeStamp; (* When the packet was created *)
  71.         ProdCode: Word; (* FTSC Product Code *)
  72.         MajorVer: Byte; (* Major product version *)
  73.         MinorVer: Byte; (* Minor product version *)
  74.         Org: ARRAY[0..15] OF Char; (* Organization *)
  75.         CapWord: CapabilityWord; (* Capability Word *)
  76.         Password: ARRAY[0..7] OF Char; (* Packet password *)
  77.         ExtraInfo: ARRAY[1..4] OF Char; (* Reserved for future extension *)
  78.     END;
  79.  
  80.     TPackedMSGheader = RECORD
  81.         HeadSize: Word; (* Size of the message header *)
  82.         MsgFlags: TMsgFlags; (* Message flags *)
  83.         MsgDate: TTimeStamp; (* When the message was created *)
  84.         MsgID: Longword; (* Unique message identifier *)
  85.         ReplyID: Longword; (* Reply linkage information *)
  86.         MsgLength: Longword; (* Length of the message in bytes *)
  87.         MsgOrig: TAddress; (* The node who created this message *)
  88.         MsgDest: TAddress; (* The node who should receive this message *)
  89.         CharSet: Byte; (* Character set *)
  90.         MsgType: Byte; (* Type of MsgData *)
  91.     END;
  92.  
  93.     TStoredMSGheader = RECORD
  94.         SRdate: TTimeStamp; (* When the message was sent or recived *)
  95.         LocalFlags: TLocalFlags; (* Local flags *)
  96.         ReplyTo: Longword; (* Message which this replies *)
  97.         Reply1st: Longword; (* First message which replies to this *)
  98.         ReplyNext: Longword; (* Next reply *)
  99.         Cost: Word; (* In the lowest currency unit *)
  100.         PMH: TPackedMSGheader; (* Same as packed MSG *)
  101.     END;
  102.  
  103.     TControlFileStr = RECORD
  104.         LastRead: Word; (* The last message read *)
  105.         HighRead: Word; (* The highest message read *)
  106.         HighWater: Word; (* High-water mark *)
  107.     END;
  108.  
  109. CONST (* Text attributes etc *)
  110.     TurnOff = $03;
  111.     Bold = $04;
  112.     Italic = $05;
  113.     Underline = $06;
  114.     AllCaps = $17;
  115.     Subscript = $19;
  116.     Superscript = $1A;
  117.     Blinking = $1C;
  118.     Inverted = $1D;
  119.     Concealed = $1E;
  120.     Quote = $1F;
  121.     BinExtShort = $15;
  122.     BinExtLong = $00;
  123.     ExtLine = $01;
  124.  
  125. (* Typed constants *)
  126.  
  127. CONST CWname: ARRAY[CWtype] OF STRING[7] =
  128.     ('Type-2','Type-3','Type-4','Type-5','Type-6','Type-7','Type-8',
  129.      'Type-9','Type-10','Type-11','Type-12','Type-13','Type-14',
  130.      'Type-15','Type-16','RFC822');
  131.  
  132. CONST FlagsName: ARRAY[FlagType] OF STRING[10] =
  133.     ('Pvt' (* Private message *),
  134.      'FileAttach' (* File attach message *),
  135.      'FileReq' (* File request message *),
  136.      'UpdReq' (* File update request message *),
  137.      'Direct' (* Do not route this message *),
  138.      'Crash'  (* High-priority mail *),
  139.      'Hold' (* Hold for pickup *),
  140.      'IMM' (* Immediate mail *),
  141.      'RRQ' (* Return receipt request *),
  142.      'CRQ' (* Confirm receipt request *),
  143.      'IRR' (* Is return receipt *),
  144.      'Machine' (* Message to a program *),
  145.      'NoForCC' (* CC in NetMail, NoForward in EchoMail *),
  146.      'Permanent' (* Message should not be pruged by age *),
  147.      'Foreign' (* Message is from an other organization *),
  148.      'reserved15' (* Reserved for future extension *));
  149.  
  150. CONST LoaclFlagName: ARRAY[LocalFlagType] OF STRING[9] =
  151.     ('Local' (* Message is created localy *),
  152.      'InTransit' (* Message is not destinated for this system *),
  153.      'Orphan' (* Unknown destination *),
  154.      'KillSent' (* Remove message after it has been sent *),
  155.      'DelSent' (* Delete attached file(s) after they have been sent *),
  156.      'TruncSent' (* Truncate attached file(s) after they have been sent *),
  157.      'Sent' (* Message has been sent *),
  158.      'IsRead' (* Message has been read by the SysOp *),
  159.      'Rcvd' (* Message has been read by its addressee *),
  160.      'LockMsg' (* Lock the message for further access *),
  161.      'DontSend' (* Do not send the actual message *),
  162.      'unused11' (* Reserved for future extension *),
  163.      'unused12' (* Reserved for future extension *),
  164.      'unused13' (* Reserved for future extension *),
  165.      'unused14' (* Reserved for future extension *),
  166.      'unused15' (* Reserved for future extension *));
  167.